package cn.uyunsky.platform.vo;

import cn.uyunsky.platform.config.bean.menu.PlTran;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * 仅为当前项目主页使用的菜单VO
 * User: baiyh
 * Date: 13-6-15
 * Time: 下午10:20
 */
public class ModelVO {

    private String id;
    private String text;
    private boolean expanded = false;
    private Set<PlTran> trans = new LinkedHashSet<PlTran>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public boolean isExpanded() {
        return expanded;
    }

    public void setExpanded(boolean expanded) {
        this.expanded = expanded;
    }

    public Set<PlTran> getTrans() {
        return trans;
    }

    public void setTrans(Set<PlTran> trans) {
        this.trans = trans;
    }

    public void addTran(PlTran plTran) {
        this.trans.add(plTran);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ModelVO{");
        sb.append("id='").append(id).append('\'');
        sb.append(", text='").append(text).append('\'');
        sb.append(", expanded=").append(expanded);
        sb.append(", trans=").append(trans);
        sb.append('}');
        return sb.toString();
    }
}
